remove characters from a text string